home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / dvi2tty / dvi2tty.h < prev    next >
C/C++ Source or Header  |  1995-01-12  |  4KB  |  88 lines

  1. #define Copyright "dvi2tty.c  Copyright (C) 1984, 1985, 1986 Svante Lindahl.\n\
  2. Copyright (C) 1988 M.J.E. Mol 1989, 1990"
  3.  
  4. #include <stdio.h>
  5. #include <string.h>
  6. #if defined(MSDOS)
  7. #include <stdlib.h>
  8. #include <malloc.h>
  9. #endif
  10.  
  11. #define TRUE        1
  12. #define FALSE       0
  13. #define nil         NULL
  14.  
  15. /*
  16.  * ERROR CODES , don't start with 0
  17.  */
  18.  
  19. #define illop    1              /* illegal op-code                   */
  20. #define stkof    2              /* stack over-flow                   */
  21. #define stkuf    3              /* stack under-flow                  */
  22. #define stkrq    4              /* stack requirement                 */
  23. #define lnerq    5              /* line allocation                   */
  24. #define badid    6              /* id is not right                   */
  25. #define bdsgn    7              /* signature is wrong                */
  26. #define fwsgn    8              /* too few signatures                */
  27. #define nopre    9              /* no pre-amble where expected       */
  28. #define nobop   10              /* no bop-command where expected     */
  29. #define nopp    11              /* no postpost where expected        */
  30. #define bdpre   12              /* unexpected preamble occured       */
  31. #define bdbop   13              /* unexpected bop-command occured    */
  32. #define bdpst   14              /* unexpected post-command occured   */
  33. #define bdpp    15              /* unexpected postpost               */
  34. #define nopst   16              /* no post-amble where expected      */
  35. #define illch   17              /* character code out of range       */
  36. #define filop   18              /* cannot access file                */
  37. #define filcr   19              /* cannot creat file                 */
  38. #if !defined(MSDOS)
  39. #define pipcr   20              /* cannot creat pipe                 */
  40. #endif
  41.  
  42. /*---------------------------------------------------------------------------*/
  43.  
  44. typedef char bool;
  45.  
  46. typedef struct prlistptr {      /* list of pages selected for output         */
  47.     int       pag;                      /* number of pages                   */
  48.     bool      all;                      /* pages in interval selected        */
  49.     struct prlistptr *prv;              /* previous item in list             */
  50.     struct prlistptr *nxt;              /* next item in list                 */
  51. } printlisttype;
  52.  
  53. /*---------------------------------------------------------------------------*/
  54.  
  55. extern bool   outputtofile;            /* output to file or stdout(dvi2tty.c)*/
  56. extern bool   pageswitchon;            /* user-set pages to print(dvistuff.c)*/
  57. extern bool   sequenceon;              /* not TeX pagenrs (dvistuff.c)       */
  58. extern bool   scascii;                 /* Scand. nat. chars (dvistuff.c)     */
  59. extern bool   noffd;                   /* output ^L or formfeed (dvistuff.c) */
  60.  
  61. extern printlisttype *currentpage;     /* current page to print (dvi2tty.c)  */
  62. extern printlisttype *firstpage;       /* first page selected (dvi2tty.c)    */
  63. extern printlisttype *lastpage;        /* last page selected (dvi2tty.c)     */
  64.  
  65. extern int            ttywidth;        /* screen width (dvi2tty.c)           */
  66. extern int            espace;          /* extra screen width (dvi2tty.c)     */
  67. extern long           foo;             /* temporary 'register' (dvi2tty.c)   */
  68. extern int            opcode;          /* dvi opcode (dvistuff.c)            */
  69.  
  70. extern FILE *DVIfile;                  /* dvi file (dvi2tty.c)               */
  71. extern FILE *output;                   /* output file (dvi2tty.c)            */
  72.  
  73. /*---------------------------------------------------------------------------*/
  74.  
  75. /* dvi2tty.c */
  76. #if defined(MSDOS)
  77. void errorexit(int);
  78. #else
  79. void errorexit();
  80. #endif
  81.  
  82. /* dvistuff.c */
  83. #if defined(MSDOS)
  84. void dvimain(void);
  85. #else
  86. void dvimain();
  87. #endif
  88.